v1.2Like Protobuf, without the pain

The single source of truth
for your data types

Skir is a declarative language for defining data types, constants, and APIs. Write your schema once in a .skir file and generate idiomatic, type-safe code in TypeScript, Python, Java, Go, C++, and more.

One schema, nine languages, zero friction

One YAML file. One command.
No manual reruns: watch mode refreshes generated code on every change.
Zero-install compiler (npx), easy to integrate into any workflow.

.skir
// shapes.skir

struct Shape {
  points: [Point];
  /// A short string describing this shape.
  label: string;
}

struct Point {
  x: int32;
  y: int32;
  label: string;
}

method IsConvex(
  Shape
): bool = 412938;
import { ServiceClient } from "skir-client";
// Import from file generated by Skir
import { IsConvex, Shape } from "../skirout/shapes.js";

// Construct an immutable Shape
const triangle = Shape.create({
  points: [
    { x: 0, y: 0, label: "A" },
    { x: 10, y: 0, label: "B" },
    { x: 0, y: 10, label: "C" },
  ],
  label: "ABC",
});

// Demonstrate round-trip serialization
const restored = Shape.serializer.fromJson(
  Shape.serializer.toJson(triangle)
);

console.log(restored.label);  // ABC

// Send RPC
const isConvex = await new ServiceClient(
  "http://localhost:8080/api"
).invokeRemote(IsConvex, triangle);

console.log(isConvex);  // true

It's a fact: AI does better with types

A 2025study reports that nearly 94% of common LLM coding errors are type-related. It helps explain why typed ecosystems such as TypeScript have been gaining momentum relative to dynamic alternatives. Don't believe it?Ask AI.

Serialize now, deserialize in 100 years

Modifying schemas in a long-lived or distributed system is risky—one wrong move can break clients or make it impossible to deserialize old data.
Skir has simple guidelines and built-in checks to evolve your schema safely.

Before
Schema before evolution changes
After
Schema after evolution changes

End-to-end typesafety with SkirRPC

SkirRPC is a lightweight HTTP protocol for typesafe cross-service or frontend↔backend communication. It integrates with your existing web framework. Your client and server use the same generated method definitions, so contract mismatches are caught before runtime.

Every SkirRPC service ships with a built-in Studio app for browsing and testing its methods.

More features

Serialization to JSON or binary

Choose between dense JSON for web APIs and databases, readable JSON for debugging, or binary for raw performance.

GitHub imports

Don't copy files. Import types directly from any GitHub repository. Share common data structures across projects.

Rust-like enums

Skir enums have variants. Each variant can be a simple constant or carry typed data, giving you a clean way to model polymorphism.

Prioritizes immutability

Except in C++, Skir generates deeply immutable types with all fields required at construction time.

Constants you can share

Define constants in your .skir files. They ship in generated code, so services share the same values without runtime config reads.

Serializable schemas

Skir schemas can be serialized and deserialized as JSON. This enables generic tools, like the Studio app, to understand schema structure.

Key-indexed arrays

The array type allows you to specify a key field, e.g. [User|user_id]. On the wire, this is just like an array, but the generated code will give you fast key-based lookups.

First-class IDE support

A powerful VS Code extension and LSP with all the features you need. Real-time validation, code completion, automatic code formatting and more.

Easy to extend

Code generators are regular NPM modules, so you can add custom ones without hacking the compiler.

Supported languages

Generate production-ready code for all major programming languages.

Ready to get started?

Set up your first Skir project in minutes. Manage your entire project configuration from a single YAML file.

Join our Discord

Ask questions, share feedback, and get help from the community.

Join Discord